<template>
  <div class="dy-box">
      <ul class="dy-list">
          <van-list v-model="loading" :finished="finished" finished-text="没有更多了！">
              <li @click="makede(item)" v-for="(item,index) in list" :key="index">
                  <p class="dy-p">
                      <img :src="item.avatar" alt="">
                  </p>
                  <div class="dy-message">
                      <div class="dy-name">{{item.real_name}}</div>
                      <div class="dy_xq">
                          <span>{{item.sex==0?'男':'女'}} </span>
                          <span>{{item.teach_age}}年教龄</span>
                      </div>
                  </div>
                  <div class="dy-make">
                      <div class="dy-btn">预约</div>
                  </div>
              </li>
          </van-list>
      </ul>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      loading: false,
      finished: true
    };
  },
  props: ["list"],
  components: {},
  mounted() {},
  methods: {
    makede(v){
        this.$router.push({
            path:'/otoplan',
            query:{
                id:v.teacher_id
            }
        })
    }
  }
};
</script>

<style scoped>
.dy-box{
    width: 95%;
    margin: 0 auto;
}
.dy-list li{
    width: 100%;
    height: 82px;
    background: #fff;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}
.dy-list li>.dy-p{
    width: 40px;
    height: 40px;
    margin-left: 15px;
    overflow: hidden;
}
.dy-list li>.dy-p>img{
    border-radius: 100%;
    width: 40px;
    height: 40px;
}
.dy-message{
    flex: 3.5;
    margin-left: 10px;
}
.dy-message>.dy-name{
    font-size: 16px;
    margin-bottom: 4px;
}
.dy-message>.dy_xq{
    color: #777
}
.dy-make{
    flex: 1.5;
}
.dy-make>.dy-btn{
    color: #eb6100;
    width: 70px;
    height: 30px;
    background: #ebeefe;
    text-align: center;
    line-height: 30px;
    border-radius: 18px;
    font-size: 15px;
}
</style>